#pragma once

#include <fishbot_behavior_tree/async_behavior_base.hpp>
#include <behaviortree_cpp/action_node.h>
#include <fishbot_behavior_tree/check_error.hpp>

#include <geometry_msgs/msg/pose_stamped.hpp>

#include <geometry_msgs/msg/pose_with_covariance_stamped.hpp>

namespace fishbot::behaviors
{
    class SetInitialPose : public fishbot::behavior_tree::AsyncBehaviorBase
    {
    public:
        SetInitialPose(const std::string &name, const BT::NodeConfiguration &config,
                       const std::shared_ptr<fishbot::behavior_tree::BehaviorContext> &shared_resources);

        static BT::PortsList providedPorts();

    private: /*  */
        tl::expected<bool, std::string> doWork() override;

        std::shared_future<tl::expected<bool, std::string>> &getFuture() override
        {
            return future_;
        }
        std::shared_future<tl::expected<bool, std::string>> future_;
    };

}